/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ejerciciodeconjuntos;
import Negocio.Cliente;
import Negocio.LeerEscribir;
import Negocio.ListaCliente;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
/**
 *
 * @author Dry Bones
 * 
 */
public class FrmCliente extends javax.swing.JFrame {

    /**
     * Creates new form FrmCliente
     */
    public FrmCliente() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        panel2 = new java.awt.Panel();
        txbCarnet = new javax.swing.JTextField();
        rbFemenino = new javax.swing.JRadioButton();
        rbMasculino = new javax.swing.JRadioButton();
        txbFechaNacimiento = new javax.swing.JTextField();
        txbApellidoMaterno = new javax.swing.JTextField();
        txbApellidoPaterno = new javax.swing.JTextField();
        txbNombre = new javax.swing.JTextField();
        txbid = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        btnGuardar1 = new javax.swing.JButton();
        btnNuevo = new javax.swing.JButton();
        btnActualizarDatos = new javax.swing.JButton();
        panel3 = new java.awt.Panel();
        btnBuscar = new javax.swing.JButton();
        txbBuscar = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tableBuscar = new javax.swing.JTable();
        rbCarnet = new javax.swing.JRadioButton();
        rbNombre = new javax.swing.JRadioButton();
        btnModificar = new javax.swing.JButton();
        btnEliminar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        buttonGroup1.add(rbFemenino);
        rbFemenino.setText("Femenino");

        buttonGroup1.add(rbMasculino);
        rbMasculino.setSelected(true);
        rbMasculino.setText("Masculino");

        txbid.setEnabled(false);

        jLabel8.setText("Id");
        jLabel8.setToolTipText("");

        jLabel9.setText("Nombre");

        jLabel10.setText("Apellido Paterno");

        jLabel11.setText("Apellido Materno");

        jLabel12.setText("Fecha de Nacimiento");

        jLabel13.setText("Sexo");

        jLabel14.setText("Carnet");

        btnGuardar1.setText("Guardar");
        btnGuardar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardar1ActionPerformed(evt);
            }
        });

        btnNuevo.setText("Nuevo");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        btnActualizarDatos.setText("Actualizar Datos");
        btnActualizarDatos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualizarDatosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panel2Layout = new javax.swing.GroupLayout(panel2);
        panel2.setLayout(panel2Layout);
        panel2Layout.setHorizontalGroup(
            panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel2Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panel2Layout.createSequentialGroup()
                        .addComponent(btnGuardar1)
                        .addGap(18, 18, 18)
                        .addComponent(btnNuevo)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnActualizarDatos))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addGap(92, 92, 92)
                        .addComponent(txbNombre))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
                        .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panel2Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(119, 119, 119))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panel2Layout.createSequentialGroup()
                                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txbid)
                            .addComponent(txbApellidoPaterno)
                            .addComponent(txbApellidoMaterno)
                            .addComponent(txbFechaNacimiento)
                            .addComponent(txbCarnet, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(panel2Layout.createSequentialGroup()
                                .addComponent(rbMasculino)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(rbFemenino)
                                .addGap(39, 39, 39)))))
                .addGap(262, 262, 262))
        );
        panel2Layout.setVerticalGroup(
            panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txbid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(txbNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txbApellidoPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txbApellidoMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txbFechaNacimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panel2Layout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbMasculino)
                            .addComponent(rbFemenino))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txbCarnet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panel2Layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel14)))
                .addGap(29, 29, 29)
                .addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnGuardar1)
                    .addComponent(btnNuevo)
                    .addComponent(btnActualizarDatos))
                .addContainerGap(223, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Insertar", panel2);

        btnBuscar.setText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });

        tableBuscar.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tableBuscar);

        buttonGroup2.add(rbCarnet);
        rbCarnet.setSelected(true);
        rbCarnet.setText("Carnet");

        buttonGroup2.add(rbNombre);
        rbNombre.setText("Nombre");

        btnModificar.setText("Modificar");

        btnEliminar.setText("Eliminar");
        btnEliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEliminarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panel3Layout = new javax.swing.GroupLayout(panel3);
        panel3.setLayout(panel3Layout);
        panel3Layout.setHorizontalGroup(
            panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panel3Layout.createSequentialGroup()
                        .addComponent(txbBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(7, 7, 7)
                        .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(panel3Layout.createSequentialGroup()
                                .addComponent(rbCarnet)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(rbNombre)
                                .addGap(14, 14, 14))
                            .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 431, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnModificar)
                .addGap(18, 18, 18)
                .addComponent(btnEliminar)
                .addGap(25, 25, 25))
        );
        panel3Layout.setVerticalGroup(
            panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnBuscar)
                    .addComponent(txbBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbNombre)
                    .addComponent(rbCarnet))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 348, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnModificar)
                    .addComponent(btnEliminar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Buscar", panel3);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 457, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    //Cambios a partir de aqui
    //Se Agrego procedimienteo Insertar Cliente
    private void CargarObjetoCliente(Negocio.Cliente obj){
        obj.setId(l.generarId());
        obj.setNombre(this.txbNombre.getText());
        obj.setApellidoPaterno(this.txbApellidoPaterno.getText());
        obj.setApellidoMaterno(this.txbApellidoMaterno.getText());
        SimpleDateFormat formatter=new SimpleDateFormat("dd/MM/yyyy");
        String dateInString =this.txbFechaNacimiento.getText();
        try{
            Date date = formatter.parse(dateInString);
            obj.setFechaNacimiento(date);
        }        
        catch(Exception e){}
        if(rbMasculino.isSelected())
            obj.setSexo("M");
        if(rbFemenino.isSelected())
            obj.setSexo("F");
        obj.setCarnet(Integer.parseInt(this.txbCarnet.getText()));
    }
    private String CargarString(Cliente obj){
        String cad="";
        cad=cad+obj.getId()+"|";
        cad=cad+obj.getNombre()+"|";
        cad=cad+obj.getApellidoPaterno()+"|";
        cad=cad+obj.getApellidoMaterno()+"|";
        cad=cad+obj.getFechaNacimiento()+"|";
        cad=cad+obj.getSexo()+"|";
        cad=cad+obj.getCarnet();
        return cad;
    }
    //Evento Click Guardar Cliente
    Negocio.ListaCliente l=new ListaCliente();
    private void btnGuardar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardar1ActionPerformed
        // TODO add your handling code here:
        Negocio.Cliente objCliente=new Cliente();
        this.CargarObjetoCliente(objCliente);
        this.txbid.setText(String.valueOf(objCliente.getId()));
        LeerEscribir objleer=new LeerEscribir();
        objleer.Escribir(this.CargarString(objCliente));       
        if(l.insertar(objCliente))
            JOptionPane.showMessageDialog(null,"Registro Completo");
        else
            JOptionPane.showMessageDialog(null,"Error de Registro");        
    }//GEN-LAST:event_btnGuardar1ActionPerformed

    //btn buscar
    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        // TODO add your handling code here:
        if(rbCarnet.isSelected()){
            List<Cliente> lCliente =l.TraerClientePorCarnet(Integer.parseInt(this.txbBuscar.getText()));
            Iterator iterador = lCliente.listIterator();
            this.DimensionarTabla(tableBuscar);
            int pos=0;
            while(iterador.hasNext()){
                DefaultTableModel model = (DefaultTableModel) this.tableBuscar.getModel();
                model.addRow(new Object[]{});
                tableBuscar.setModel(model);
                Cliente objCliente=new Cliente();
                objCliente=(Cliente)iterador.next();
                this.tableBuscar.setValueAt(objCliente.getId(),pos,0);
                this.tableBuscar.setValueAt(objCliente.getNombre(),pos,1);
                this.tableBuscar.setValueAt(objCliente.getApellidoPaterno(),pos,2);
                this.tableBuscar.setValueAt(objCliente.getApellidoMaterno(),pos,3);
                this.tableBuscar.setValueAt(objCliente.getFechaNacimiento(),pos,4);
                this.tableBuscar.setValueAt(objCliente.getSexo(),pos,5);
                this.tableBuscar.setValueAt(objCliente.getCarnet(),pos,6);
                pos++;
            }
        }
        if(rbNombre.isSelected()){
            List<Cliente> lCliente =l.TraerClientePorNombre(this.txbBuscar.getText());
            Iterator iterador = lCliente.listIterator();
            this.DimensionarTabla(tableBuscar);
            int pos=0;
            while(iterador.hasNext()){
                DefaultTableModel model = (DefaultTableModel) this.tableBuscar.getModel();
                model.addRow(new Object[]{});
                tableBuscar.setModel(model);
                Cliente objCliente=new Cliente();
                objCliente=(Cliente)iterador.next();
                this.tableBuscar.setValueAt(objCliente.getId(),pos,0);
                this.tableBuscar.setValueAt(objCliente.getNombre(),pos,1);
                this.tableBuscar.setValueAt(objCliente.getApellidoPaterno(),pos,2);
                this.tableBuscar.setValueAt(objCliente.getApellidoMaterno(),pos,3);
                this.tableBuscar.setValueAt(objCliente.getFechaNacimiento(),pos,4);
                this.tableBuscar.setValueAt(objCliente.getSexo(),pos,5);
                this.tableBuscar.setValueAt(objCliente.getCarnet(),pos,6);
                pos++;
            }
        }
    }//GEN-LAST:event_btnBuscarActionPerformed

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
        // TODO add your handling code here:
        this.txbid.setText("");
        this.txbNombre.setText("");
        this.txbApellidoPaterno.setText("");
        this.txbApellidoMaterno.setText("");
        this.txbFechaNacimiento.setText("");
        this.txbCarnet.setText("");
        this.txbBuscar.setText("");
    }//GEN-LAST:event_btnNuevoActionPerformed

    private void btnActualizarDatosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarDatosActionPerformed
        // TODO add your handling code here:
        LeerEscribir objleer=new LeerEscribir();
        l=objleer.Leer(); 
        JOptionPane.showMessageDialog(null,"Datos Actualizados Correctamente");
//        this.btnActualizarDatos.setVisible(false);
    }//GEN-LAST:event_btnActualizarDatosActionPerformed

    private void btnEliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEliminarActionPerformed
        // TODO add your handling code here:       
        LeerEscribir objleer=new LeerEscribir();
        int i=this.tableBuscar.getSelectedRow(); 
        String del=String.valueOf(this.tableBuscar.getValueAt(i, 0));
        l.Eliminar(Integer.parseInt(del));
        objleer.Eliminar(Integer.parseInt(del));  //revisar :V
        DefaultTableModel modelo = (DefaultTableModel)tableBuscar.getModel(); 
        modelo.removeRow(this.tableBuscar.getSelectedRow()); 
        tableBuscar.setModel(modelo);        
    }//GEN-LAST:event_btnEliminarActionPerformed
    //Dimensiona Tabla Nuevamente :v
    private void DimensionarTabla(JTable dt){
        DefaultTableModel model = new DefaultTableModel(); 
        JTable Table = new JTable(model); 
        model.addColumn("id");
        model.addColumn("Nombre");
        model.addColumn("ApellidoPaterno");
        model.addColumn("ApellidoMaterno");
        model.addColumn("FechaNacimiento");
        model.addColumn("Sexo");
        model.addColumn("Carnet");
        dt.setModel(model);
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrmCliente().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizarDatos;
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnEliminar;
    private javax.swing.JButton btnGuardar1;
    private javax.swing.JButton btnModificar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private java.awt.Panel panel2;
    private java.awt.Panel panel3;
    private javax.swing.JRadioButton rbCarnet;
    private javax.swing.JRadioButton rbFemenino;
    private javax.swing.JRadioButton rbMasculino;
    private javax.swing.JRadioButton rbNombre;
    private javax.swing.JTable tableBuscar;
    private javax.swing.JTextField txbApellidoMaterno;
    private javax.swing.JTextField txbApellidoPaterno;
    private javax.swing.JTextField txbBuscar;
    private javax.swing.JTextField txbCarnet;
    private javax.swing.JTextField txbFechaNacimiento;
    private javax.swing.JTextField txbNombre;
    private javax.swing.JTextField txbid;
    // End of variables declaration//GEN-END:variables
}
